﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="hotelinformation.aspx.vb" Inherits="hotels.hotelinformation" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">



    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="HotelName" HeaderText="HotelName" 
                SortExpression="HotelName" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" />
            <asp:ImageField DataImageUrlField="Picture">
            </asp:ImageField>
        </Columns>
    </asp:GridView>

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:hotelsConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:hotelsConnectionString.ProviderName %>" 
        SelectCommand="SELECT [HotelName], [Description], [Picture] FROM [hotellist] WHERE ([ID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="1" Name="ID" QueryStringField="ID" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>

    <br />
    <asp:CheckBoxList ID="CheckBoxList1" runat="server" 
        DataSourceID="SqlDataSource2" DataTextField="Tag" DataValueField="ID">
    </asp:CheckBoxList>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:hotelsConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:hotelsConnectionString.ProviderName %>" 
        SelectCommand="SELECT [ID], [Tag] FROM [Tags] ORDER BY [Tag]">
    </asp:SqlDataSource>
    <br />

    <br />
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
        DataSourceID="commentsDataSource" Height="103px" Width="407px">
        <Columns>
            <asp:TemplateField HeaderText="Comments">
            
            <asp:ItemTemplate>
            <div style="background-color:Silver">
            <span style="background-color:Yellow"><b>
            <%# Eval("Subject") %></b></span><br />
            <%# Eval("Author") %><br />
            <%# Eval("Message") %><br />
            </div>
            </asp:ItemTemplate>
            
            <AlternatingItemTemplate>
            <div style="background-color:White">
            <span style="background-color:Yellow"><b>
            <%# Eval("Subject") %></b></span><br />
            <%# Eval("Author") %><br />
            <%# Eval("Message") %><br />
            </div>         
            </AlternatingItemTemplate>       

            
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="commentsDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:hotelsConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:hotelsConnectionString.ProviderName %>" 
        SelectCommand="SELECT [Author], [Subject], [Message] FROM [Comments] WHERE ([HotelID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="HotelID" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <strong>Add your comment:</strong><br />
    <br />
    Your Name<br />
    <asp:TextBox ID="tb_author" runat="server" Width="401px"></asp:TextBox>
    <br />
    Title<br />
    <asp:TextBox ID="tb_subject" runat="server" Width="401px"></asp:TextBox>
    <br />
    Your comment<br />
    <asp:TextBox ID="tb_comment" runat="server" Height="165px" TextMode="MultiLine" 
        Width="401px"></asp:TextBox>
    <br />
    <br />
    <asp:Button ID="Button1" runat="server" Text="Button" Width="95px" />
    <br />
    <br />

</asp:Content>
